const sequelize = require('./sequelize.js')


const dbConnection = async () => {
    return new Promise(async (resolve, reject) => {
      try {
        await sequelize.authenticate();
        console.log("mysql Connection successful !!! ");
        resolve();
      } catch (error) {
        console.error("Unable to connect to the database:", error);
        reject(error);
      }
    });
  };

  module.exports = dbConnection
  